<#include "include/_meta.html">
<html>
<head>
    <title>管理员列表</title>

</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 车辆管理<span class="c-gray en">&gt;</span> 车辆保险信息修改 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div id="app" class="app">
        <form id="addf" onsubmit="return false">
            <table class="table">
                <tr>
                    <td>记录编号：</td><td><input type="text" readonly="readonly" required  id="recordid" name="recordid" value="${datas.recordid}">
                    </td>
                </tr>
                <tr>
                    <td>车辆编号:</td><td><input type="text" id="carid" name="carid" value="${datas.carid}">
                    </td>
                </tr>
                <tr>
                    <td>保险公司：</td><td><input type="text" id="company" name="company" value="${datas.company}">
                    </td>
                </tr>
                <tr>
                    <td>出现电话：</td><td><input type="text" id="companyphone" name="companyphone" value="${datas.companyphone}">
                    </td>
                </tr>
                <tr>
                    <td>保单编号:</td><td><input type="text" id="code" name="code" value="${datas.code}">
                    </td>
                </tr>
                <tr>
                    <td>保单内容:</td><td><input type="text" id="content" name="content" value="${datas.content}">
                    </td>
                </tr>
                <tr>
                    <td>保单费用:</td><td><input type="text" id="money" name="money" value="${datas.money!}">
                    </td>
                </tr>
                <tr>
                    <td>生效日期:</td><td><input type="date" id="validdate" name="validdate" required="required" value="${validdate?string('yyyy-MM-dd')}">
                    </td>
                </tr>
                <tr>
                    <td>失效日期:</td><td><input type="date" id="invaliddate" name="invaliddate" required="required" value="${invaliddate?string('yyyy-MM-dd')}">
                    </td>
                </tr>
                <tr>
                    <td>经办人员:</td><td><input type="text" id="contactman" name="contactman" value="${datas.contactman}">
                    </td>
                </tr>
                <tr>
                    <td>经办手机:</td><td><input type="text" id="contactmobile" name="contactmobile" value="${datas.contactmobile}">
                    </td>
                </tr>
                <tr>
                    <td>备注信息:</td><td><input type="text" id="remark" name="remark" value="${datas.remark}">
                    </td>
                </tr>
                <tr>
                    <td>系统时间:</td><td><input type="date" id="addtime" name="addtime" required="required" value="${addtime?string('yyyy-MM-dd')}"></td>
                </tr>
                <tr>
                    <td><input id="buss" type="submit" value="提交"> </td><td><input id="cancelBtn" type="button" value="取消"> </td>
                </tr>
            </table>
        </form>
    </div>
</div>
<#include "include/_footer.html">
<script>
    $("#cancelBtn").click(function () {
        var index=parent.layer.getFrameIndex(window.name);
        parent.getCarInsuPagelist();
        parent.layer.close(index);
    });
    $('#addf').validate({
        keyup: false,
        onblur: true,
        rules: {
            recordid:{
                required: true
            },
            carid:{
                required: true
            },
            company:{
                required: true
            },
            companyphone:{
                required: true
            },
            code:{
                required: true
            },
            content:{
                required: true
            },
            money:{
                required: true,
                number: true
            },
            validdate:{
                required: true
            },
            contactman:{
                required: true
            },
            invaliddate:{
                required: true
            },
            contactmobile:{
                required: true
            },
            remark:{
                required: true
            },
            addtime:{
                required: true
            }
        },
        submitHandler: function () {
            $.ajax({
                url:'/insures/updata',
                type:'POST',
                dataType:'json',
                data:$('#addf').serialize(),
                success:function (data) {
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.getCarInsuPagelist();
                    parent.layer.close(index);
                }
            })
        }
    });
</script>
</body>
</html>